#ifndef __IMAGE_H__
#define __IMAGE_H__

#include "gofgame/common/Ref.h"
#include "gofgame/common/ui/ImageDisplayMode.h"
#include "gofgame/common/ui/Component.h"
#include "gofgame/common/ui/ComponentEventArgs.h"
#include "gofgame/common/graphics/TextureBrush.h"
#include <string>

namespace gofgame {
	namespace common {
		namespace ui {
			
			using namespace gofgame::common;
			using namespace gofgame::common::ui;
			using namespace gofgame::common::graphics;
			using namespace std;

			class Image : public Component {

			public:
				Image();

				virtual const char *getResourceName() const;
				virtual void setResourceName(const char *resourceName);
				virtual void setTexture(CCTexture2D *texture);

				virtual ImageDisplayMode getDisplayMode() const;
				virtual void setDisplayMode(ImageDisplayMode displayMode);

				virtual void draw() _override;

				virtual void setBackgroundBrush(Brush *backgroundBrush) _override;

			protected:
				Ref<CCTexture2D> texture;
				Ref<TextureBrush> textureBrush;

			private:
				ImageDisplayMode displayMode;
				string resourceName;
			};
		}
	}
}

#endif //__IMAGE_H__
